# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-zerofltexx
pkgdesc="Samsung Galaxy S6"
pkgver=3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	postmarketos-base
	postmarketos-base-downstream-disable-udev-v4l
	linux-samsung-zerofltexx
	mkbootimg
	msm-fb-refresher
"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-nonfree-firmware:nonfree_firmware
	$pkgname-openrc
	"
source="deviceinfo"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="Non-free firmware for the Samsung Galaxy S6"
	depends="firmware-samsung-zero"
	mkdir "$subpkgdir"
}

openrc() {
	install_if="$pkgname=$pkgver-r$pkgrel openrc"
	install="$subpkgname.post-install"

	mkdir -p "$subpkgdir"
}


sha512sums="
6ea0c4f6dd88c7b29dd78dff516caab50b4c4aee4e359b0e3b1a06ab174dad23de46b5a13bc2f3ada88495377afae7cf10a62841a4de9819db5709c29e03f5ef  deviceinfo
"
